package ferus.tigris.lines.views;

import ferus.tigris.lines.GameView;
import ferus.tigris.lines.R;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Point;
import android.graphics.Rect;

public class BackgroundView implements AbstractView {
	Bitmap image;
	Rect srcRect;
	Rect dstRect;

	public BackgroundView(GameView gameView) {
		image = BitmapFactory.decodeResource(gameView.getResources(), R.drawable.sky);
		int h = gameView.getHeight() > image.getHeight() ? gameView.getHeight() : image.getHeight();
		int w = gameView.getWidth() > image.getWidth() ? gameView.getWidth() : image.getWidth();
		srcRect = new Rect(0, 0, image.getWidth(), image.getHeight());
		dstRect = new Rect(0, 0, w, h);
	}

	public void draw(Canvas canvas) {
		canvas.drawBitmap(image, srcRect, dstRect, null);
	}

	public void setPosition(Point position) {
	}

	public void setRealSpriteWidth(int px) {
	}
}